<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta content="width=device-width, initial-scale=1" name="viewport">
    <title>玉灵 QQ:7031633 Email:webrx@126.com</title>
    <meta content="关键字" name="keywords">
    <meta content="简介" name="description">
</head>

<body>
<script>
    //
    //localStorage 保存数据到本地浏览器缓存目录下，最多数据量5MB
    //localStorage.setItem(key,value)
    //localStorage.getItem(key)
    //localStorage.clear()
    //localStorage.removeItem(key)
    //localStorage.length

    localStorage.setItem('name', '李四')
    // localStorage.clear()
    // localStorage.removeItem('name')
    // document.write(localStorage.getItem("name"))
    // document.write(localStorage.length)

    //sessionStorage   保存数据到本地浏览器缓存目录下，最多数据量5MB，关闭浏览器自动清除
    sessionStorage.setItem('name', '李四')
    console.log(sessionStorage.getItem("name"))

    //document.cookie = ''
</script>

<a href="store2.html">store2.html</a>
</body>
</html>
